import request from '@/utils/request'

export default {
// 搜索
selectByKeyWord(keyWord) {
    // debugger
    return request({
      url: '/fund/selectkey?select='+keyWord,
      method: 'get',
      params: { keyWord }
    })
  },
  //下架基金
deleteById(ids) {
    // debugger
    return request({
        url: `/fund/delete`,
        method: 'post',
        data: ids
    })
  },
  //显示所有基金
selectAll(page, limit) {
    return request({
        url: `/fund/selectall`,
        method: 'get',
        params:{
            page: page,
            limit: limit
    } 
    })
},
//显示单个数据
selectOne(id) {
  return request({
      url: `/fund/selectOne?id=${id}`,
      method: 'get'
  })
},
//更新基金
updayteOne(fund) {
  return request({
      url: `/fund/updateone`,
      method: 'post',
      data: fund
  })
},
//新增
addOne(fund) {
    return request({
        url: `/fund/addone`,
        method: 'post',
        data: fund
    })
},




// 搜索已下架
selectDeleteKeyWord(keyWord) {
  // debugger
  return request({
    url: '/fund/selectkeydel',
    method: 'get',
    params: { keyWord }
  })
},
//显示所有已下架
selectAllDelete(page, limit) {
  return request({
      url: `/fund/selectdelete`,
      method: 'get',
      params:{
          page: page,
          limit: limit
  } 
  })
},
  //彻底删除
  deleteDel(ids) {
    // debugger
    return request({
        url: `/fund/deleteDel`,
        method: 'post',
        data: ids
    })
  },
//恢复基金
recoverFund(id) {
return request({
    url: `/fund/recoverfund`,
    method: 'get',
    params: { id }
})
},


//恢复基金
addByFundCode(fundCodeInt) {
  return request({
      url: `/fund/selectnet?fundCodeInt=`+fundCodeInt,
      method: 'get',
  })
  },


}